<?php
return [
    'bootstrap' => ['maintenance'],
    'components' => [
        'request' => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => '',
        ],
        'authClientCollection' => [
            'class' => 'yii\authclient\Collection',
            'clients' => [
                'qq' => [
                    'class' => 'common\modules\user\components\authclient\QqAuth',
                    'clientId' => '',
                    'clientSecret' => ''
                ],
                'github' => [
                    'class' => 'yii\authclient\clients\GitHub',
                    'clientId' => '',
                    'clientSecret' => ''
                ],
                'live' => [
                    'class' => 'yii\authclient\clients\Live',
                    'clientId' => '',
                    'clientSecret' => ''
                ]
            ]
        ],
        'maintenance' => [
            'class' => 'common\components\maintenance\Maintenance',
            'enabled' => function ($app)
            {
                return $app->keyStorage->get('frontend.maintenance') === 'true';
            }
        ],
        'assetManager' => [
            // Compressed assets
            'bundles' => require(__DIR__ . '/assets/_bundles.php')
        ]
    ]
];
